package cn.bore.tomato.domain.bo;

import cn.bore.tomato.domain.TmsSessions;
import cn.bore.common.mybatis.core.domain.BaseEntity;
import cn.bore.common.core.validate.AddGroup;
import cn.bore.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 番茄记录业务对象 tms_sessions
 *
 * @author 范亚鹏
 * @date 2025-08-30
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TmsSessions.class, reverseConvertGenerate = false)
public class TmsSessionsBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * 番茄任务编码
     */
    @NotNull(message = "番茄任务编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long taskId;

    /**
     * 番茄时长
     */
    @NotNull(message = "番茄时长不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date startTime;

    /**
     * 休息时长
     */
    @NotNull(message = "休息时长不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date endTime;

    /**
     * 计划时长
     */
    @NotNull(message = "计划时长不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long plannedDuration;

    /**
     * 实际时长
     */
    @NotNull(message = "实际时长不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long actualDuration;


}
